package ui;

import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

public class TopMenu extends JPanel
{

	/**
	 * 
	 */
	private static final long serialVersionUID = 4633477683912286436L;

	public TopMenu()
	{
		setLayout(new FlowLayout(FlowLayout.LEFT));
		JButton startAll = new JButton("Go");
		startAll.addActionListener(new ActionListener() {

			@Override
			public void actionPerformed(ActionEvent arg0)
			{
				MainWindow.getInstance().getModel().startAll();
				
			}
			
		});
		add(startAll);
		JButton stopAll = new JButton("Stop");
		stopAll.addActionListener(new ActionListener(){

			@Override
			public void actionPerformed(ActionEvent e)
			{
				MainWindow.getInstance().getModel().stopAll();
				
			}
			
		});
		add(stopAll);
	}
}
